package com.gitee.huanminabc.fastboot.web.exception;

import com.gitee.huanminabc.fastboot.web.servlet.RequestMethodEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;


@EqualsAndHashCode(callSuper = true)
@Data
public class ApiMethodNotFoundException extends RuntimeException implements Serializable {
    private String uri;
    private RequestMethodEnum requestMethodEnum;

    public ApiMethodNotFoundException(RequestMethodEnum requestMethodEnum, String uri) {
        super(requestMethodEnum.name() + " method not found, uri: " + uri);
        this.uri = uri;
        this.requestMethodEnum = requestMethodEnum;
    }

}